
import { hexToRgba } from '@/utils/commonFunction.js'
import ProgressBarCss from './ProgressBar.module.css'

function ProgressBar(props) {
  const hexToRgba1 = (color, alpha) => {
    return hexToRgba(color, alpha)
  }
  return (
    <div className={ProgressBarCss.progress} style={{ background: hexToRgba1(props.colors, 0.5) }}>
      <div className={ProgressBarCssProgressBarCss.progress - bar} style={{ width: (props.num / props.count) * 100 + '%', background: hexToRgba1(props.colors, 1) }}></div>
    </div>
  )
}
export default ProgressBar